<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .Box {
            margin-bottom: 100px;
            display: flex;
            justify-content: center;
        }

        .Box2 {
            margin-bottom: 100px;
            display: flex;
            justify-content: space-around;
        }

        .Box3 {
            display: flex;
            justify-content: space-between;
        }

        .Box-A,
        .Box2-A,
        .Box3-A {
            width: 50px;
            height: 60px;
            background-color: red;
        }

        .Box-B,
        .Box2-B,
        .Box3-B {
            width: 150px;
            height: 160px;
            background-color: blue;
        }

        .Box-C,
        .Box2-C,
        .Box3-C {
            width: 250px;
            height: 260px;
            background-color: green;
        }

        span {
            display: inline-block;
            line-height: 25px;
            text-align: center;
            margin-bottom: 20px;
            width: 320px;
            height: 25px;
            color: white;
            background-color: gray;
            border-radius: 10px;
            box-shadow: inset;
        }
    </style>
</head>

<body>
    <!-- 2. 主轴对齐练习：
    - 使用justify-content属性，将上述练习中的子元素在主轴（默认为水平方向）上居中对齐。
    - 将子元素在主轴上分散对齐，使用space-between和space-around属性。。 -->
    <span>将子元素在主轴上居中对齐</span>
    <div class="Box">
        <div class="Box-A">A</div>
        <div class="Box-B">B</div>
        <div class="Box-C">C</div>
    </div>

    <span>将子元素在主轴上分散对齐space-between</span>
    <div class="Box2">
        <div class="Box2-A">A</div>
        <div class="Box2-B">B</div>
        <div class="Box2-C">C</div>
    </div>

    <span>将子元素在主轴上分散对齐space-around</span>
    <div class="Box3">
        <div class="Box3-A">A</div>
        <div class="Box3-B">B</div>
        <div class="Box3-C">C</div>
    </div>
</body>

</html>